Configuring Ports for Cluster Environment

  1. Change the port numbers, for each instance, in each instance to avoid conflicts while running the servers.

    1. The port numbers can be changed in <Tomcat home dir>/conf/server.xml file.

    server.xml for cluster

    <Server port="1005" shutdown="SHUTDOWN">
    <!-- Tomcat plugin for Tomcat-->
    <Listener className="org.apache.Tomcat.catalina.ServerListener" />
    <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
    <!-- Security listener. Documentation at /docs/config/listeners.html
    <Listener className="org.apache.catalina.security.SecurityListener" />
    -->
     
    <Connector port="1010" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8449" xpoweredBy="false" server="Apache Tomcat" />
  2. The catalina.properties file in the conf folder needs to be modified so as to make the Tomcat container to pick custom configuration or jars defined by user.